KeySort
KeySort[assoc] orders the elements of an association by sorting its keys.
KeySort[assoc,p] orders the elements of an association using the ordering function p.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.